package com.lebang.mapper;

import com.lebang.domain.TaskWorthRecord;
import com.lebang.example.TaskWorthRecordExample;
import org.apache.ibatis.annotations.Mapper;
import com.lebang.configuration.datasource.DataSource;
import org.apache.ibatis.annotations.Param;

import javax.annotation.ParametersAreNonnullByDefault;
import java.util.List;

/**
 * TaskWorthRecordMapper继承基类
 */
@Mapper
public interface TaskWorthRecordMapper extends MyBatisBaseDao<TaskWorthRecord, Integer, TaskWorthRecordExample> {

    @DataSource("commonDB")
Integer selectByTimeSdk(@Param("appId") Integer appid, @Param("time") Integer time, @Param("sdkKey") String sdkKey);

    @DataSource("commonDB")
    List<TaskWorthRecord> selectList(@Param("row") long row,@Param("limit") Integer limit,@Param("list") List<String> appStores,@Param("appId") Integer appId,@Param("sdkKey") String sdkKey,@Param("star") Integer star,@Param("end") Integer end,@Param("lists") List<String> sList);
    @DataSource("commonDB")
    long countList(@Param("list") List<String> appStores,@Param("appId") Integer appId,@Param("sdkKey") String sdkKey,@Param("star") Integer star,@Param("end") Integer end,@Param("lists") List<String> sList);
    @DataSource("commonDB")
    List<Integer> selectTime(@Param("row") long row, @Param("limit") Integer limit,@Param("appId") Integer appId,@Param("sdkKey") String sdkKey,@Param("star") Integer star,@Param("end") Integer end,@Param("list") List<String> sList);
    @DataSource("commonDB")
    long countAll(@Param("appId") Integer appId,@Param("sdkKey")  String sdkKey,@Param("star")  Integer star,@Param("end")  Integer end,@Param("list") List<String> sList);
    @DataSource("commonDB")
    List<TaskWorthRecord> sumDataGroubySdk(@Param("row") long row,@Param("limit") Integer limit,@Param("appId") Integer appId,@Param("sdkKey")  String sdkKey, @Param("star") Integer star,@Param("end") Integer end,@Param("list") List<String> sList);
    @DataSource("commonDB")
    Integer selectByTimeSdkAppStore(@Param("appId") Integer appid, @Param("time") Integer time, @Param("sdkKey") String sdkKey,@Param("appStore") String appStore);
}